package design_pattern.TwoPhaseTermination;

import sun.java2d.pipe.AlphaPaintPipe;

/**
 * @Author: 蔡翔
 * @Date: 2019/11/19 9:31
 * @Version 1.0
 *
 * 不要跑
 * 核心在于：
 *          1.单独开一个线程 把任务包装好 然后投递给线程池
 *          2.try(){}cache(Exception e){} Finally{// 这里做一些后续的处理（扫尾操作）}
 */
public class AppServerClient {
    public static void main(String[] args) throws InterruptedException {
        AppServer appServer = new AppServer(13345);
        appServer.start();

        Thread.sleep(45_000L);
        appServer.shutdown();
    }
}
